[css-text-4] Add an optional second value to hyphenate-character
to render the unchosen ­
#12255
Labels
hyphenate-character
to render the unchosen ­
#12255
Uh oh!
There was an error while loading. Please reload this page.
Status quo
Currently,
hyphenate-character
's values are defined as (cf. https://www.w3.org/TR/css-text-4/#hyphenate-character [2025-05-31])with the semantics that when a
­
word-break opportunity is taken, the­
character is rendered as the given string (which has anauto
default). When a­
word-break opportunity isn't taken, the­
character isn't rendered.Proposal
I propose adding a second, optional argument to
hyphenate-character
with default value""
that specifies the rendering of a­
character whose word-break opportunity isn't taken:The rendered, untaken
­
becomes part of the physical text with regards to selection ranges.Motivation
Hyphenation rules in modern English (e.g.
en-GB
) and German after the spelling reform (e.g.de-DE
) fithyphenate-character
's model well: when you can break, break and add a hyphen, else don't break and leave the word alone.However, when typesetting German preceding the spelling reform (language code
de-DE-1901
), hyphenation may add and remove letters:Adding letters
"ll" -> "ll-l"
when breaking can be achieved with contemporary CSS:But changing letters
"ck" -> "k-k"
when breaking, to my knowledge, cannot be achieved in pure CSS (I have written an ECMAScript resize observer which changes letters'display: none
styling, though it possibly falls into a never-ending loop when the font rendering gives different characters too dissimilar widths).With an unused-
­
text parameter tohyphenate-character
, the break opportunity could be aptly described:Raison d'être
I think adding an as-described non-taken
­
rendering argument tohyphenate-character
opens up the possibility for correctly breaking justifiedde-DE-1901
text, a feature CSS is currently lacking, through a generic feature without introducingde-DE-1901
-specific styling rules.Pre-orthography-reform German has its place on the Web: when citing older texts in a justified layout, incorrectly breaking invalidates the citation and not breaking aesthetically hurts the text. Furthermore, active publications exist that choose to write in
de-DE-1901
(e.g. Lettre International (cf. https://www.lettre.de/ [2025-05-31]).The text was updated successfully, but these errors were encountered: